﻿<!DOCTYPE html>
<html>
<!-- 培训计划管理 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    <div id="app" class="popupW100" v-cloak>
        <el-form label-position="right" :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px"
            size="mini">
            <el-row>
                <el-col :span="24" align="center">
                    <h1>{{Form.mark01}}</h1>
                </el-col>

                <el-col :span="24" align="right">
                    报告人:{{Form.mark02}}
                </el-col>

                <el-col :span="24">
                    <el-form-item :label="TrainingPlanManagement.Summaryoftraining+mark.m" prop="summaryoftraining"
                                  class="inputTextarea">
                        <el-input type="textarea" v-model="Form.summaryoftraining" autocomplete="off">
                        </el-input>
                        <span class="iputLineMust" v-if="!Form.summaryoftraining">
                            <!-- 必填项添加 -->
                            <img src="/static/images/exclamation.png" alt="">
                        </span>
                    </el-form-item>
                </el-col>


                <el-col :span="24">
                    <el-form-item :label="TrainingPlanManagement.TrainingevaluationmethodsandStrategies+mark.m"
                                  prop="trainingevaluationmethodsandStrategies" class="inputTextarea">
                        <el-input type="textarea" v-model="Form.trainingevaluationmethodsandStrategies"
                                  autocomplete="off">
                        </el-input>
                        <span class="iputLineMust" v-if="!Form.trainingevaluationmethodsandStrategies">
                            <!-- 必填项添加 -->
                            <img src="/static/images/exclamation.png" alt="">
                        </span>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item :label="TrainingPlanManagement.Trainingcost+mark.m" prop="trainingcost"
                                  class="inputTextarea">
                        <el-input type="textarea" v-model="Form.trainingcost" autocomplete="off">
                        </el-input>
                        <span class="iputLineMust" v-if="!Form.trainingcost">
                            <!-- 必填项添加 -->
                            <img src="/static/images/exclamation.png" alt="">
                        </span>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item :label="TrainingPlanManagement.Overallanalysis+mark.m" prop="overallanalysis"
                                  class="inputTextarea">
                        <el-input type="textarea" v-model="Form.overallanalysis" autocomplete="off">
                        </el-input>
                        <span class="iputLineMust" v-if="!Form.overallanalysis">
                            <!-- 必填项添加 -->
                            <img src="/static/images/exclamation.png" alt="">
                        </span>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item :label="TrainingPlanManagement.Supportivefactorsandobstacles+mark.m"
                                  prop="supportivefactorsandobstacles" class="inputTextarea">
                        <el-input type="textarea" v-model="Form.supportivefactorsandobstacles" autocomplete="off">
                        </el-input>
                        <span class="iputLineMust" v-if="!Form.supportivefactorsandobstacles">
                            <!-- 必填项添加 -->
                            <img src="/static/images/exclamation.png" alt="">
                        </span>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item :label="TrainingPlanManagement.Summaryandrecommendations+mark.m"
                                  prop="summaryandrecommendations" class="inputTextarea">
                        <el-input type="textarea" v-model="Form.summaryandrecommendations" autocomplete="off">
                        </el-input>
                        <span class="iputLineMust" v-if="!Form.summaryandrecommendations">
                            <!-- 必填项添加 -->
                            <img src="/static/images/exclamation.png" alt="">
                        </span>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end">
                <el-form-item>
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>-->
                    <el-button v-if="Form.id==guidEmpty" type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>
                    <el-button type="primary" @click="parent.ListItem.dialogVisible=false">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                value1: '',
                // picked : '1',
                //父业传参
                id: '',
                //获取下拉菜单frequency
                frequency: [],
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    Summaryoftraining: '',
                    TrainingevaluationmethodsandStrategies: '',
                    Trainingcost: '',
                    Overallanalysis: '',
                    Supportivefactorsandobstacles: '',
                    Summaryandrecommendations: '',

                },
                //表单验证
                rules: {
                    summaryoftraining: [
                        verification.NotNull,
                    ],
                    trainingevaluationmethodsandStrategies: [
                        verification.NotNull,
                    ],
                    trainingcost: [
                        verification.NotNull,
                    ],
                    overallanalysis: [
                        verification.NotNull,
                    ],
                    supportivefactorsandobstacles: [
                        verification.NotNull,
                    ],

                    summaryandrecommendations: [
                        verification.NotNullSelect
                    ],

                }
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/PX_PlanReport/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    getData(this, '/api/PX_PlanReport/get?id=' + this.id);
                    this.Form.frequency = this.Form.frequency + "";
                },
            },
            mounted: function () {
                this.id = getUrlParam("id");
                this.getData();
                //获取下拉菜单内容
                //this.frequency = getDicData('56');
                //初始化数据
                // this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
        });
    </script>
</body>

</html>